﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Silk.NET.OpenCL;

namespace useNuget
{
    class Program
    {
        static void Main(string[] args)
        {
            var cl = CL.GetApi();
            IntPtr ptr = new IntPtr();
            uint num;
            cl.GetPlatformIDs(3, out ptr, out num);
            var ptrs = new List<IntPtr>();
            for (int i = 0; i < num; i++)
            {
                ptrs.Add(Marshal.ReadIntPtr(ptr, IntPtr.Size * i));
            }
            unsafe
            {
                for (int i = 0; i < ptrs.Count; i++)
                {
                    UIntPtr size = new UIntPtr();
                    cl.GetPlatformInfo(ptrs[i], PlatformInfo.Name, 0, null, &size);
                }
            }
        }
    }
}
